<?php

declare(strict_types=1);

use Hyperf\Database\Seeders\Seeder;
use Hyperf\DbConnection\Db;

class User extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $created_at = date('Y-m-d H:i:s');
        $sql = "INSERT INTO user (id, pfid,name,avatar,created_at) VALUES 
            (1,1,'阳阳','','$created_at'),
            (2,1,'洋洋','','$created_at'),
            (3,1,'样样','','$created_at'),
            (4,1,'养养','','$created_at'),
            (5,1,'痒痒','','$created_at'),
            (6,1,'扬扬','','$created_at')
        ";
        Db::insert($sql);
        $sql = "INSERT INTO user_fd (uid, pfid,fd,created_at) VALUES 
            (1,1,0,'$created_at'),
            (2,1,0,'$created_at'),
            (3,1,0,'$created_at'),
            (4,1,0,'$created_at'),
            (5,1,0,'$created_at'),
            (6,1,0,'$created_at')
        ";
        Db::insert($sql);
        $sql = "INSERT INTO user_friend_list (uid,pfid,touid,created_at) VALUES 
           (1,1,2,'$created_at'),
           (1,1,3,'$created_at'),
           (1,1,4,'$created_at'),
           (1,1,5,'$created_at'),
           (1,1,6,'$created_at'),
           (6,1,1,'$created_at'),
           (5,1,1,'$created_at'),
           (4,1,1,'$created_at'),
           (3,1,1,'$created_at'),
           (2,1,1,'$created_at')
        ";
        Db::insert($sql);
    }
}
